package com.songlanyun.common.supplychainapi.config;

import com.jxhh.ApiClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 */
@Slf4j
@Configuration
public class SupplyChaiConfig {
    @Bean
    public ApiClient apiClient(SupplyChaiProperties properties) {
        try {
            ApiClient client = new ApiClient(properties.getAppKey(),properties.getAppSecret());
            client.setDebug(properties.getDebug()); //设置调试模式
            return client;
        }
        catch (Exception ex)
        {
            log.error("第三方初始化错误："+ex.getMessage());
        }
        return null;



    }
}
